package cn.tedu.toa.management.sys.service.impl;

import cn.tedu.toa.management.sys.entity.FBresources;
import cn.tedu.toa.management.sys.mapper.FBresourcesMapper;
import cn.tedu.toa.management.sys.service.FBresourcesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 业务资源表 服务实现类
 * </p>
 *
 * @author huaqian
 * @since 2021-10-02
 */
@Service
public class FBresourcesServiceImpl extends ServiceImpl<FBresourcesMapper, FBresources> implements FBresourcesService {
    @Resource
    FBresourcesMapper bresourcesMapper;

    @Override
    public List<FBresources> getFBresources() {
        List<FBresources> bresources=bresourcesMapper.selectList(null);
        return bresources;
    }

    @Override
    public PageInfo<FBresources> findBresourcesList(String servicename,int pageNum,int pageSize) {
        //pageHelp分页
        PageHelper.startPage(pageNum,pageSize);
        List<FBresources> list=bresourcesMapper.selectBresourcesList(servicename);
        return new PageInfo<FBresources>(list);
    }
}
